import random
money = 50
while 1:
    if money <= 0:
        print("游戏你输了")
        break
    if money >=100:
        print("游戏你赢了")
        break
    system = random.randint(0,2)
    user =int(input("请出拳(0代表石头1代表剪刀2代表布):"))
    if system == 0 and user == 1:   
        print("你输了,减5金币")
        money -=5
        continue
    if system == 0 and user == 2:  
        print("你赢了,加10金币")
        money += 10
        continue
    if system == 1 and user == 0:    
        print("你赢了,加10金币")
        money += 10
        continue
    if system == 1 and user == 2:   
        print("你输了,减5金币")
        money -= 5
        continue
    if system == 2 and user == 0:    
        print("你输了,减5金币")
        money -= 5
        continue
    if system == 2 and user == 1:  
        print("你赢了,加10金币")
        money += 10
        continue
    print("打平了")